//
//  NSObject+JSON.h
//  SmartTalk
//
//  Created by 陈勃 on 14-12-25.
//  Copyright (c) 2014年 gameabc. All rights reserved.
//

#import <Foundation/Foundation.h>
/// Adds JSON generation to NSArray
@interface NSArray (NSArray_SBJsonWriting)

/// Returns a string containing the receiver encoded in JSON.
- (NSString *)JSONRepresentation;

@end


/// Adds JSON generation to NSArray
@interface NSDictionary (NSDictionary_SBJsonWriting)

/// Returns a string containing the receiver encoded in JSON.
- (NSString *)JSONRepresentation;

@end

#pragma mark JSON Parsing

/// Adds JSON parsing methods to NSString
@interface NSString (NSString_SBJsonParsing)

/// Returns the NSDictionary or NSArray represented by the receiver's JSON representation, or nil on error
- (id)JSONValue;

@end